<ul>
  {% if dataset.datasetparameterset_set.all %}
  {% for parameterset in dataset.datasetparameterset_set.all %}
	{% if has_write_permissions %}{% if not experiment.public %}{% if not immutable %}<p><a href="{% url tardis.tardis_portal.views.edit_dataset_par parameterset.id %}"
	 class="jqModalDs{{parameterset.id}}">[Edit Metadata]</a></p>{% endif %}{% endif %}{% endif %}

     <p><strong><em>{{parameterset.schema}}</em></strong></p>

     {% for parameter in parameterset.datasetparameter_set.all %}
         <li><strong>{{ parameter.name.full_name }}: </strong>
	   {{ parameter.get }}
         </li>
     {% endfor %}
     <br/>
     <br/>
	<script type="text/javascript">
	$('#jqmAlertDs{{parameterset.id}}').unbind();
	$('#jqmAlertDs{{parameterset.id}}').jqm({
	  trigger: ".jqModalDs{{parameterset.id}}",
	  ajax: '@href',
	  target: '#jqmAlertContentdataset{{parameterset.id}}',
	  overlay: 0
	  });
	</script>

	{% if has_write_permissions %}
	<div class="jqmAlert" id="jqmAlertDs{{parameterset.id}}">

		<div class="jqmAlertWindow">
		    <div class="jqmAlertTitle clearfix">
		    <h1>Edit Parameters</h1><a href="#" class="jqmClose"><em>Close</em></a>
		  </div>

		  <div class="jqmAlertContent" id="jqmAlertContentdataset{{parameterset.id}}">
		  <p>Please wait... <img src="/site_media/images/busy.gif" alt="loading" /></p>
		  </div>
		</div>
	</div>
	{% endif %}
  {% endfor %}
  {% else %}
	There is no metadata for this dataset
  {% endif %}
</ul>
